package Expe15;

import java.io.*;

public class T3 {
    public static void main(String[] args) {
        File readFile = new File("D:\\Git\\gitCode\\java-journal\\Expe15\\T2.txt");
        File writeFile = new File("D:\\Git\\gitCode\\java-journal\\Expe15\\T3.txt");
        try {
            //把 T2.txt的内容全部复制到T3.txt中
            FileReader from = new FileReader("D:\\Git\\gitCode\\java-journal\\Expe15\\T2.txt");
            BufferedReader in = new BufferedReader(from);

            FileWriter to = new FileWriter("D:\\Git\\gitCode\\java-journal\\Expe15\\T3.txt");
            BufferedWriter out = new BufferedWriter(to);
            out.write(in.readLine());

            out.flush();
            from.close();
            to.close();

        }
        catch (IOException e){
            System.out.println(e);
        }
    }
}
